package hwOne1;

public class PrintTransposeArray {
    public static void main(String[] args) {
        int[][] array = {
                {
                    1, 2, 3,
                },
                {
                    4, 5, 6,
                }
        };
        int[][] trans = new int[3][2];
        for (int i = 0; i < array.length; i++) {
            int[] row = array[i];
            for (int j = 0; j < row.length; j++) {
                int mem = row[j];
                trans[j][i] = mem;
            }
        }

        for (int[] row : trans) {
            for (int element : row) {
                System.out.print(element + " ");
            }
            System.out.println();
        }
    }
}
